package org.example.usercontroller;

import org.springframework.web.bind.annotation.*;

@RequestMapping("/user") //修饰类
@RestController
public class UserController {

    @RequestMapping(value = "/hello",method = RequestMethod.GET) //修饰方法
    public String say() {
        return "this is a test";
    }

    @GetMapping("/hello2")
    public String say2() {
        return "this is a test2";
    }

    @PostMapping("/hello3")
    public String say3() {
        return "this is a test3";
    }

//    @PostMapping("/hello3")
//    public String say4() {
//        return "this is a test4";
//    }
}
